import React from 'react'
import { homeRouters } from '../../router'
import { useNavigate } from 'react-router-dom'
import { TabBar } from 'antd-mobile'

function Index() {
    const navigate = useNavigate()
    return (
        <div>
            <TabBar onChange={(key) => navigate(key)}>
                {homeRouters.map(item => (
                    <TabBar.Item key={item.path} icon={item.icon} title={item.title} />
                ))}
            </TabBar>
        </div>
    )
}

export default Index
